﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Entity
{
    class Donghuong
    {
        #region[Public Properties]

        public string Id { get; set; }
        public string Name { get; set; }
        public string Ngaysinh { get; set; }
        public string Xom { get; set; }
        public string Congviec { get; set; }
        public string Diachi { get; set; }
        public string Dienthoai { get; set; }
        public string Email { get; set; }
        public string Account { get; set; }
        public string Pass { get; set; }
        public string GroupNewsId { get; set; }
        public string Date { get; set; }
        #endregion
        #region[DonghuongIDataReader]
        public  static Donghuong DonghuongIDataReader(IDataReader dr)
        {
            var obj = new Donghuong
                          {
                              Id = Convert.ToString(dr["id"]),
                              Name = Convert.ToString(dr["Name"]),
                              Ngaysinh = Convert.ToString(dr["Ngaysinh"]),
                              Xom = Convert.ToString(dr["Xom"]),
                              Congviec = Convert.ToString(dr["Congviec"]),
                              Diachi = Convert.ToString(dr["Diachi"]),
                              Dienthoai = Convert.ToString(dr["Dienthoai"]),
                              Email = Convert.ToString(dr["Email"]),
                              Account = Convert.ToString(dr["Accont"]),
                              Pass = Convert.ToString(dr["Pass"]),
                              GroupNewsId = Convert.ToString(dr["GroupNewsId"]),
                              Date = Convert.ToString(dr["Date"])
                          };
            return obj;
        }
        #endregion
    }
}
